feat: establish Nx migrations foundations#928
Open
nx-plugin-for-aws wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #928 +/- ##
==========================================
+ Coverage 87.61% 87.70% +0.09%
==========================================
Files 156 158 +2
Lines 5723 5830 +107
Branches 1363 1393 +30
==========================================
+ Hits 5014 5113 +99
- Misses 362 364 +2
- Partials 347 353 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Wire migrations support into @aws/nx-plugin per the strategy in #703: - Register migrations.json via the package.json nx-migrations field - Stamp migration versions at package time from git release tags (scripts/stamp-migrations.ts): shipped migrations keep the version of the first tag registering them; unshipped migrations get a version strictly between the latest tag and any possible next release, so contributors never author version fields - Document the migrations strategy in CONTRIBUTING.md: the three Nx 23 migration kinds (deterministic / agentic prompt / hybrid), what should and shouldn't be a migration, guardrails, versioning and testing expectations Closes #703
8025360 to
4b6b4a7
Compare
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for this change
First step of the Nx Migrations workstream for v1.0 (#718): before any migration can ship, the plugin needs
migrations.jsonwired in, a versioning mechanism compatible with the repo's tag-only release model, and documented contributor guidelines. Strategy discussed and locked in on #703 (deterministic vs agentic split per Nx 23's agenticnx migrate).Description of changes
migrations.jsonintopackages/nx-plugin/package.jsonvia thenx-migrationsfield, and copy it into dist as a compile asset. The collection starts empty — no released change currently warrants a migration (the feat(ts#mcp-server): stop vending a nested project package.json #916 nestedpackage.jsonremoval leaves a harmless leftover in existing workspaces, which per the strategy is not a migration).scripts/stamp-migrations.ts, newstamp-migrationstarget in thepackagedependency chain). Sourcemigrations.jsonentries carry noversionfield — the release model never commits versions to source. The script derives them from git release tags:1.0.0-rc.32→1.0.0-rc.32.1), so it runs for every user upgrading from any released version regardless of what the next release number turns out to be. Semver precedence comparison is implemented inutils/migration-versions.ts(git tag sort isn't semver-aware for prereleases).implementation/ agenticprompt/ hybrid), what should and shouldn't be a migration, guardrails, versioning, and testing expectations.Description of how you validated changes
packagetarget: stamped distmigrations.jsonproduced correctly against the current tag set (empty collection passes through cleanly).Issue # (if applicable)
Closes #703.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license